import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login/doLogin',
    method: 'post',
    data: data
  })
}

//获取用户信息
export function getInfo(token) {
  return request({
    url: 'login/getInfo',
    method: 'get',
    params: { token }
  })
}
//退出
export function logout() {
  return request({
    url: 'login/logout',
    method: 'get'
  })
}

//加载菜单
export function getMenus() {
  return request({
    url: 'login/getMenu',
    method: 'get'
  })
}
